﻿using IOP.Pulsar.Default;
using IOP.Pulsar.Extensions;
using Microsoft.Extensions.Hosting;
using System;
using System.Threading.Tasks;

namespace RawSocketIntegrationTest
{
    public class Program
    {
        public static async Task Main(string[] args)
        {
            await CreateHostBuilder(args).Build().RunAsync();
        }

        public static IHostBuilder CreateHostBuilder(string[] args)
            => Host.CreateDefaultBuilder(args)
            .ConfigurePulsarHost(builder =>
            {
                builder.AddRawSocketServer<RawSocketContext>("testServer");
                builder.UseStartup<Startup>();
            }).UseEnvironment("Development");
    }
}
